/*
 * 菜单
 *
 * @Author:    zhoujk
 * @Date:      2022-09-03 22:00:32
 */
import { postRequest } from '/src/lib/axios'

export const menuMerchantApi = {
  /**
   * 添加菜单
   */
  insert: (param) => {
    return postRequest('/b-merchant/menu/insert', param)
  },

  /**
   * 删除菜单
   */
  delete: (param) => {
    return postRequest('/b-merchant/menu/delete', param)
  },

  /**
   * 更新菜单状态
   */
  updateStatus: (param) => {
    return postRequest('/b-merchant/menu/update_status', param)
  },

  /**
   * 更新菜单
   */
  update: (param) => {
    return postRequest('/b-merchant/menu/update', param)
  },

  /**
   * 根据id查询菜单
   */
  findOne: (param) => {
    return postRequest('/b-merchant/menu/find_id', param)
  },

  /**
   * 查询所有菜单列表
   */
  list: (param) => {
    return postRequest('/b-merchant/menu/list', param)
  },

  /**
   * 查询所有菜单列表
   */
  tree: (param) => {
    return postRequest('/b-merchant/menu/tree', param)
  },
}
